/****************************************************************************
 * FILE NAME: 		generic.h
 * 
 * PROJECT NAME: 	EGR330_Project
 * TEAM MEMBERS: 	Kevin Vermeer
 * 					Brandon Ross
 *					Tyler Selk
 *
 *
 * CREATED: 		31 July 2011
 * LAST MODIFIED: 	
 * 
 * DESCRIPTION:		Handles generic functions and register manipulations
 ****************************************************************************/

/* HEADER GUARD */
#ifndef GENERIC_H
#define GENERIC_H


#define TRUE 1
#define FALSE 0

uint8_t setRegister
(
	uint8_t register_value, 
	uint8_t clear_mask,
	uint8_t set_mask,
	uint8_t register_position
);

uint8_t setBit
(
	uint8_t register_value,
	uint8_t bit_mask
);

uint8_t clearBit
(
	uint8_t register_value,
	uint8_t bit_mask
);

uint8_t toggleBit
(
	uint8_t register_value,
	uint8_t bit_mask
);

uint8_t isBitSet
(
	uint8_t register_value,
	uint8_t bit_mask
);

uint8_t isBitClear
(
	uint8_t register_value,
	uint8_t bit_mask
);

#endif
